#ifndef _MCAST_SOCKET_H
#define _MCAST_SOCKET_H

#ifdef __cplusplus
extern "C" {
#endif

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

void *mcast_socket_create(void);
int mcast_socket_destory(void *handle);

int mcast_socket_bind_ifr(void *handle, char *ifr);
int mcast_socket_bind(void *handle, char *ip, int port);
int mcast_socket_rejoin(void *handle);
int mcast_socket_recv(void *handle, void *buf, int len, char *from_ip, int *from_port, int timeout);
int mcast_socket_send(void *handle, void *buf, int len, char *to_ip, int to_port, int timeout);

#ifdef __cplusplus
}
#endif

#endif
